package com.lwc.cfdns.service;

import com.lwc.cfdns.pojo.entity.SystemAdminRole;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author spring
 * @description 针对表【cfdns_system_admin_role(用户和角色关联表)】的数据库操作Service
 * @createDate 2023-05-24 20:52:46
 */
public interface SystemAdminRoleService extends IService<SystemAdminRole> {
    /**
     * 管理员角色
     *
     * @param admin_id
     * @param role_ids
     * @return boolean
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/24 20:55:04
     */
    boolean roles(Long admin_id, List<Long> role_ids);

    /**
     * 批量给角色添加管理员授权
     *
     * @param roleId
     * @param adminIds
     * @return boolean
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/30 14:00:57
     */
    boolean batAddAdminIdsOfRoles(Long roleId, List<Long> adminIds);

    /**
     * 批量给角色取消管理员授权
     *
     * @param roleId
     * @param adminIds
     * @return boolean
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/30 14:00:57
     */
    boolean batCancelAdminIdsOfRoles(Long roleId, List<Long> adminIds);

    /**
     * 查询角色下的用户
     *
     * @param roleId
     * @return List<Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/30 13:15:46
     */
    List<Object> getAdminIds(Long roleId);
}
